import { createApp } from 'vue'
import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from '@/router/index.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 1. 引入Pinia
import { createPinia } from "pinia";
// 引入echarts
import Echarts from 'vue-echarts'
import * as echarts from 'echarts'
const pinia = createPinia()
const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus)
app.use(router)
app.use(pinia)
app.config.globalProperties.$echarts = echarts
app.component('e-charts', Echarts)
app.mount('#app')